package com.ruoyi.config.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.config.mapper.TaskCategoriesMapper;
import com.ruoyi.config.domain.TaskCategories;
import com.ruoyi.config.service.ITaskCategoriesService;

/**
 * 任务分类Service业务层处理
 * 
 * @author atzxc
 * @date 2024-04-16
 */
@Service
public class TaskCategoriesServiceImpl implements ITaskCategoriesService 
{
    @Autowired
    private TaskCategoriesMapper taskCategoriesMapper;

    /**
     * 查询任务分类
     * 
     * @param CategoryId 任务分类主键
     * @return 任务分类
     */
    @Override
    public TaskCategories selectTaskCategoriesByCategoryId(Long CategoryId)
    {
        return taskCategoriesMapper.selectTaskCategoriesByCategoryId(CategoryId);
    }

    /**
     * 查询任务分类列表
     * 
     * @param taskCategories 任务分类
     * @return 任务分类
     */
    @Override
    public List<TaskCategories> selectTaskCategoriesList(TaskCategories taskCategories)
    {
        return taskCategoriesMapper.selectTaskCategoriesList(taskCategories);
    }

    /**
     * 新增任务分类
     * 
     * @param taskCategories 任务分类
     * @return 结果
     */
    @Override
    public int insertTaskCategories(TaskCategories taskCategories)
    {
        return taskCategoriesMapper.insertTaskCategories(taskCategories);
    }

    /**
     * 修改任务分类
     * 
     * @param taskCategories 任务分类
     * @return 结果
     */
    @Override
    public int updateTaskCategories(TaskCategories taskCategories)
    {
        return taskCategoriesMapper.updateTaskCategories(taskCategories);
    }

    /**
     * 批量删除任务分类
     * 
     * @param CategoryIds 需要删除的任务分类主键
     * @return 结果
     */
    @Override
    public int deleteTaskCategoriesByCategoryIds(Long[] CategoryIds)
    {
        return taskCategoriesMapper.deleteTaskCategoriesByCategoryIds(CategoryIds);
    }

    /**
     * 删除任务分类信息
     * 
     * @param CategoryId 任务分类主键
     * @return 结果
     */
    @Override
    public int deleteTaskCategoriesByCategoryId(Long CategoryId)
    {
        return taskCategoriesMapper.deleteTaskCategoriesByCategoryId(CategoryId);
    }
}
